package cn.zhibang.sannuo.pharmacy.service.impl;

import cn.zhibang.sannuo.commons.model.BranchOffice;
import cn.zhibang.sannuo.pharmacy.dao.PBranchOfficeDao;
import cn.zhibang.sannuo.pharmacy.service.PBranchOfficeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author admin
 * @version 1.0.0
 * @ClassName PBranchOfficeServiceImpl.java
 * @Description TODO
 * @createTime 2021年04月14日 14:17:00
 */
@Service
@Transactional
public class PBranchOfficeServiceImpl implements PBranchOfficeService {
    @Autowired private PBranchOfficeDao branchOfficeDao;
    @Override
    public List<BranchOffice> selAllBranchOffice(Integer hid, String bname, String bnumber, String baddress, Integer bleng) {
        return branchOfficeDao.selectAllBranchOffice(hid, bname, bnumber, baddress, bleng);
    }

    @Override
    public Integer addBranchOffice(BranchOffice branchOffice) {
        return branchOfficeDao.insertBranchOffice(branchOffice);
    }

    @Override
    public String selMaxBnumber(Integer hid) {
        return branchOfficeDao.selectMaxBnumber(hid);
    }
}
